home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / UTILITY2 / RFDML120.ZIP / CSERVE.SCR < prev    next >
Text File  |  1994-01-18  |  20KB  |  703 lines

  1. ;------------------------------------------------------
  2. ;
  3. ;CSERVE.SCR --- The script file for CompuServe
  4. ;
  5. ;------------------------------------------------------
  6. ;
  7. ;   We begin with the format specifiers to which allow
  8. ;the script to identify where the MailId, RealName,
  9. ;and Subject texts are in a newly downloaded letter.
  10. ;
  11. Format
  12. Reply to: $SUBJECT$\n
  13. Subject: $SUBJECT$\n
  14. Subj: $SUBJECT$\n
  15. From: [$UID$] $NAME$\n
  16. From: $NAME$[$UID$]
  17. From: $NAME$>$UID$\n
  18. From: $UID$\n
  19. Endformat
  20. ;
  21. ;------------------------------------------------------
  22. ; The following is a set of aliases which define the
  23. ; various prompts that CIS will send.
  24. ;
  25. Alias cishost 'Host Name:'
  26. Alias cisprompt 'Enter choice'
  27. Alias loginprompt '\nUser ID: '
  28. Alias passwdprompt '\nPassword:'
  29. Alias presscr 'Press <CR>!'
  30. ;
  31. ; The following aliases define the banner lines for
  32. ; various areas of the CIS system
  33. ;
  34. Alias mailmenubanner 'Mail  Main Menu'
  35. Alias msgmenubanner '\nCompuServe Mail  Message Menu'
  36. ;
  37. ;------------------------------------------------------
  38. ; The following alias determines what intermediate network
  39. ; will be assumed.  It can be one of the following:
  40. ;
  41. ;    DIRECT    Direct connection to CIS Packet Net
  42. ;    SPRINT    Connect through SprintNet
  43. ;    TYMNET    Connect through TymNet
  44. ;
  45. Alias connectype DIRECT
  46. ;
  47. ; The following alias should be set TRUE if your modem
  48. ; drops carrier every time you make a connection.  This
  49. ; alias simply forces the script to wait 2 seconds for
  50. ; the connection to settle before starting the script.
  51. ;
  52. Alias waitasec FALSE
  53. ;
  54. ;------------------------------------------------------
  55. ; The following aliases cause the script to use
  56. ; XMODEM for the transfer protocol.  Comment them
  57. ; out if you wish to use ASCII instead:
  58. ;
  59. Alias dnloadproto REQUEST_XMODEM_DNLOAD
  60. Alias uploadproto REQUEST_UPLOAD_XMODEM
  61. ;
  62. ; Uncomment the following aliases if you wish to
  63. ; use ASCII transfers:
  64. ;
  65. ;Alias dnloadproto REQUEST_ASCII_DNLOAD
  66. ;Alias uploadproto REQUEST_UPLOAD_ASCII
  67. ;
  68. ;------------------------------------------------------
  69. ; This is the main entry-point for the script, which
  70. ; decides which intermediate network will be used to
  71. ; connect to CompuServe.
  72. ;
  73. Begin START
  74.    If %waitasec% Then WAIT_START
  75.    If TRUE Then %connectype%
  76. End
  77. Begin WAIT_START
  78.    Timeout 2 Goto %connectype%
  79. End
  80. ;
  81. ;------------------------------------------------------
  82. ; This is the entry point for a direct dial-in to CIS
  83. ; Packet Net.  Basically it begins by sending a Control-C
  84. ; every three seconds until we see a 'User ID' prompt.
  85. ;
  86. Begin DIRECT
  87.    Caption 'connected'
  88.    Control C
  89.    When %cishost% Goto CIS_HOST
  90.    When %loginprompt% Goto USERNAME
  91.    Timeout 3 Goto DIRECT
  92. End
  93. ;------------------------------------------------------
  94. ; This is the entry point for a dial-in to CIS via
  95. ; SprintNet.
  96. ;
  97. Alias sprintterm 'TERMINAL='
  98. Begin SPRINT
  99.    Timeout 2 Goto SPRINT0
  100. End
  101. Begin SPRINT0
  102.    Caption 'connected'
  103.    Transmit '@'
  104.    Timeout 1 Goto SPRINTCR
  105. End
  106. Begin SPRINTCR
  107.    Cr
  108.    When %sprintterm% Goto SPRINT_TERM
  109.    CarrierLoss Goto NO_LOGIN
  110.    Timeout 8 Goto SPRINT1
  111. End
  112. Begin SPRINT1
  113.    Transmit '@'
  114.    Timeout 1 Goto SPRINTCR1
  115. End
  116. Begin SPRINTCR1
  117.    Cr
  118.    When %sprintterm% Goto SPRINT_TERM
  119.    CarrierLoss Goto NO_LOGIN
  120.    Timeout 8 Goto SPRINT2
  121. End
  122. Begin SPRINT2
  123.    Transmit '@'
  124.    Timeout 1 Goto SPRINTCR2
  125. End
  126. Begin SPRINTCR2
  127.    Cr
  128.    When %sprintterm% Goto SPRINT_TERM
  129.    CarrierLoss Goto NO_LOGIN
  130.    Timeout 30 Goto NO_LOGIN
  131. End
  132. Begin SPRINT_TERM
  133.    Transmit 'D1'
  134.    Cr
  135.    When '@' Goto SPRINT_LOGIN
  136.    When %sprintterm% Goto SPRINT_TERM
  137.    Timeout 30 Goto NO_LOGIN
  138. End
  139. Begin SPRINT_LOGIN
  140.    Transmit 'C 614227'
  141.    Cr
  142.    When %cishost% Goto CIS_HOST
  143.    When %loginprompt% Goto USERNAME
  144.    When '@' Goto SPRINT_LOGIN2
  145.    Timeout 45 Goto NO_LOGIN
  146. End
  147. Begin SPRINT_LOGIN2
  148.    Transmit 'C 202202'
  149.    Cr
  150.    When %cishost% Goto CIS_HOST
  151.    When %loginprompt% Goto USERNAME
  152.    Timeout 45 Goto NO_LOGIN
  153. End
  154. ;------------------------------------------------------
  155. ; This is the entry point for a dial-in to CIS via
  156. ; TymNet.
  157. ;
  158. Alias tymterm 'terminal identifier'
  159. Alias tymlogin 'please log in'
  160. Alias tymcis 'CML05'
  161. Begin TYMNET
  162.    Caption 'connected'
  163.    When %tymterm% Goto TYMNET_TERM
  164.    CarrierLoss Goto NO_LOGIN
  165.    Timeout 5 Goto TYMNET1
  166. End
  167. Begin TYMNET1
  168.    Cr
  169.    When %tymterm% Goto TYMNET_TERM
  170.    CarrierLoss Goto NO_LOGIN
  171.    Timeout 5 Goto TYMNET2
  172. End
  173. Begin TYMNET2
  174.    Cr
  175.    When %tymterm% Goto TYMNET_TERM
  176.    CarrierLoss Goto NO_LOGIN
  177.    Timeout 15 Goto NO_LOGIN
  178. End
  179. Begin TYMNET_TERM
  180.    Transmit 'A'
  181.    When %tymlogin% Goto TYMNET_LOGIN
  182.    When %tymterm% Goto TYMNET_TERM
  183.    CarrierLoss Goto NO_LOGIN
  184.    Timeout 15 Goto NO_LOGIN
  185. End
  186. Begin TYMNET_LOGIN
  187.    Transmit %tymcis%
  188.    Cr
  189.    When %tymlogin% Goto TYMNET_LOGIN
  190.    When %cishost% Goto CIS_HOST
  191.    When %loginprompt% Goto USERNAME
  192.    CarrierLoss Goto NO_LOGIN
  193.    Timeout 45 Goto NO_LOGIN
  194. End
  195. ;
  196. ;------------------------------------------------------
  197. ; These states perform the login process into CIS
  198. ;
  199. Begin CIS_HOST
  200.    Transmit 'CIS,DOMESTIC'
  201.    Cr
  202.    When %cishost% Goto CIS_HOST
  203.    When %loginprompt% Goto USERNAME
  204.    Timeout 45 Goto NO_LOGIN
  205. End
  206. Begin USERNAME
  207.    Caption 'logging in'
  208.    Transmit $USERNAME
  209.    Cr
  210.    When %passwdprompt% Goto PASSWORD
  211.    When %loginprompt% Goto USERNAME
  212.    Timeout 20 Goto NO_LOGIN
  213. End
  214. Begin PASSWORD
  215.    Transmit $PASSWORD
  216.    Cr
  217.    When %passwdprompt% Goto PASSWORD
  218.    When %loginprompt% Goto USERNAME
  219.    When 'CompuServe Information Service' Goto LOGGED_IN
  220.    Timeout 20 Goto NO_LOGIN
  221. End
  222. Begin LOGGED_IN
  223.    Caption 'logged in'
  224.    When %msgmenubanner% Goto MESSAGE_MENU
  225.    When 'New This Week' Goto NEW_MENU
  226.    When %cisprompt% Goto JUMP_TO_MAIL
  227.    Timeout 30 Goto JUMP_TO_MAIL
  228. End
  229. Begin NEW_MENU
  230.    When %cisprompt% Goto JUMP_TO_MAIL
  231.    Timeout 20 Goto JUMP_TO_MAIL
  232. End
  233. ;------------------------------------------------------
  234. ; These states deal with getting from wherever we are
  235. ; into the CIS Mail Area.
  236. ;
  237. Begin JUMP_TO_MAIL
  238.    Transmit 'go email'
  239.    Cr
  240.    When 'Mail  Message Menu' Goto MESSAGE_MENU
  241.    When 'additional information (Y or N)!' Goto ANSWER_NO
  242.    When 'is temporarily unavailable' Goto MAIL_UNAVAILABLE
  243.    When %mailmenubanner% Goto MAIL_MAIN_MENU
  244.    When %cisprompt% Goto JUMP_TO_MAIL
  245.    Timeout 20 Goto GIVE_UP
  246. End
  247. Begin ANSWER_NO
  248.    Transmit 'N'
  249.    Cr
  250.    When 'Mail  Message Menu' Goto MESSAGE_MENU
  251.    When 'additional information (Y or N)!' Goto ANSWER_NO
  252.    When %mailmenubanner% Goto MAIL_MAIN_MENU
  253.    When %cisprompt% Goto JUMP_TO_MAIL
  254.    Timeout 20 Goto GIVE_UP
  255. End
  256. ;------------------------------------------------------
  257. ; At this point we're entering the main menu of the
  258. ; mail area.  These states detect if there's mail,
  259. ; and if there is it initiates a download of the next
  260. ; letter in line.  If not, and there are more letters
  261. ; to deliver, an upload is initiated
  262. ;
  263. Begin MAIL_MAIN_MENU
  264.    Caption 'Mail Area'
  265.    When '*** No mail waiting ***' Goto NO_MAIL_WAITING
  266.    When 'letters waiting' Goto MAIL_WAITING
  267.    When 'letter waiting' Goto MAIL_WAITING
  268.    When 'message pending' Goto MAIL_WAITING
  269.    When 'messages pending' Goto MAIL_WAITING
  270.    When %cisprompt% Goto JUMP_TO_MAIL
  271.    Timeout 20 Goto GIVE_UP
  272. End
  273. Begin MAIL_WAITING
  274.    If FETCHING Then FETCH_FROM_MAIN_MENU
  275.    If MORE_LETTERS Then SEND_MAIL
  276.    When %cisprompt% Goto LOG_OFF
  277.    Timeout 20 Goto LOG_OFF
  278. End
  279. Begin NO_MAIL_WAITING
  280.    Caption 'No Mail'
  281.    If MORE_LETTERS Then SEND_MAIL
  282.    When %cisprompt% Goto LOG_OFF
  283.    Timeout 20 Goto GIVE_UP
  284. End
  285. ;------------------------------------------------------
  286. ; These states are run when the silly "Message Menu"
  287. ; appears at login time.  If the script is fetching
  288. ; mail, it will initiate a download of a letter from
  289. ; this menu.  Note that only one letter will be downloaded,
  290. ; if there are more, the script gets the rest from the
  291. ; normal Mail Menu.
  292. ;
  293. Begin MESSAGE_MENU
  294.    Caption 'You have mail'
  295.    If FETCHING Then FETCH_FROM_MESSAGE_MENU
  296.    When 'M for CompuServe Mail' Goto JUMP_TO